Part Number Hot Search : 
257003 78F05T SC2643VX 1N5271 MIC2537 3266P100 SC250 4C225K05
Product Description
Full Text Search
 

To Download SDK135 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  embedded sdk (software development kit) type 1 telephony features library SDK135/d rev. 1, 07/23/2002 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola table of contents i about this document audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix suggested reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x definitions, acronyms, and abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x references. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi chapter 1 introduction 1.1 quick start. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 1.2 telephony features libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 1.3 overview of the type 1 telephony features library . . . . . . . . . . . . . . . . . . . . . . . . 1-2 1.3.1 background. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 1.3.2 features and performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 chapter 2 directory structure 2.1 required core directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 2.2 optional (domain-specific) directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 chapter 3 type 1 telephony features library interfaces 3.1 type 1 telephony features library interface services . . . . . . . . . . . . . . . . . . . . . . 3-1 3.2 interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1 3.2.1 variable definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4 3.3 specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3- 6 3.3.1 type1cidcreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7 3.3.2 type1ciddestroy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 3.3.3 type1cidinit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 3.3.4 type1cid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10 chapter 4 building the type 1 telephony features library 4.1 building the type 1 telephony features library . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 contents f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
ii type 1 telephony features library motorola chapter 5 linking applications with the type 1 telephony features library 5.1 type 1 telephony features library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 5.1.1 library sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 chapter 6 type 1 telephony features library applications 6.1 type 1 verification test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 6.1.1 test set-up and procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 6.2 example application using cid1.lib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 chapter 7 license 7.1 limited use license agreement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola list of tables iii 1-1 type 1 telephony features library memory and mips requirements . . . . . . . . . . . . . . 1-5 3-1 type1cidcreate arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7 3-2 type1ciddestroy arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 3-3 type1cidinit arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 3-4 type1cid arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10 list of tables f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
iv type 1 telephony features library motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola list of figures v 1-1 the functional blocks of a generic type 1 telephony solution. . . . . . . . . . . . . . . . . . . 1-4 2-1 core directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 2-2 cidtype1 directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 2-3 cidtype1 directory structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 4-1 example of a cid1 library link to a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 list of figures f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
vi type 1 telephony features library motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola list of examples vii 3-1 teldefs.h - reference definition for type1cid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 3-2 cid1.h - reference definition for type1cid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 5-1 example of a linker.cmd file for type 1 telephony features library. . . . . . . . . . . . . . . 5-1 6-1 use of type1cid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2 list of examples f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
viii type 1 telephony features library motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola preface ix about this document this manual describes the type 1 telephony features library for use with motorola?s embedded software development kit (sdk). audience this document targets software developers implementing communication features for analog telephone lines. organization this manual is arranged in the following sections:  chapter 1, introduction ?provides a brief overview of this document  chapter 2, directory structure ?provides a description of the required core directories  chapter 3, type 1 telephony features library interfaces ?describes all of the type 1 telephony features library functions  chapter 4, building the type 1 telephony features library ?tells how to build a test application project with the pre-built type 1 telephony features library  chapter 5, linking applications with the type 1 telephony features library ?describes linking projects with the type 1 telephony features library  chapter 6, type 1 telephony features library applications ?describes the use of the type 1 telephony features library through test/demo applications  chapter 7, license ?provides the license required to use this product suggested reading we recommend that you have a copy of the following references:  motorola dsp56800e reference manual, dsp56800erm/d  motorola dsp568xx user?s manual , for the dsp device you ? re implementing  inside codewarrior: core tools , metrowerks corp. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
x type 1 telephony features library motorola conventions this document uses the following notational conventions: definitions, acronyms, and abbreviations the following list defines the acronyms and abbreviations used in this document. as this template develops, this list will be generated from the document. as we develop more group resources, these acronyms will be easily defined from a common acronym dictionary. please note that while the acronyms are in solid caps, terms in the definition should be initial capped only if they are trademarked names or proper nouns. adc analog-to-digital converter typeface, symbol or term meaning examples courier monospaced type code examples //process command for line flash italic directory names project names calls functions statements procedures routines arguments file names applications variables directives code snippets in text ...and contains these core directories: applications contains applications software... ...codewarrior project, 3des.mcp is... ...the pconfig argument.... ...defined in the c header file, aec.h .... bold reference sources paths emphasis ...refer to the targeting dsp5685x platform manual.... ...see: c:\program files\motorola\embedded sdk\help\tutorials all capital letters # defines/ defined constants # define include_stack_check brackets [...] function keys ...by pressing function key [f7] quotation marks, ?...? returned messages ...the message, ?test passed? is displayed.... ...if unsuccessful for any reason, it will return ?null?... blue text linkable on-line ...refer to chapter 7 , license.... number any number is considered a positive value, unless preceded by a minus sym- bol to signify a negative value 3v -10 des -1 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola preface xi agc automatic gain control api application programming interface ascii american standard code for information interchange bpf bandpass filter cid caller id (calling party name and/or number identification) cpe customer premises (telephony) equipment cq call qualifier daa data access arrangement dsp digital signal processor or digital signal processing dtmf dual tone multiple frequency fsk frequency shift keying modulation ide integrated development environment lpf low pass filter mdmf multiple data message format of gr-30-core mips million instructions per second once? on-chip emulation osi open switching interval pc personal computer pcm pulse code modulation pstn public switched telephone network sdk software development kit sdmf single data message format of gr-30-core src source vmwi visual message waiting indicator references the following sources were referenced to produce this book: 1. motorola dsp56800e reference manual , dsp56800erm/d 2. motorola dsp568xx user ? s manual , for the dsp device you ? re implementing 3. targeting motorola dsp568xx platform , for the dsp device you ? re implementing 4. motorola embedded sdk programmer ? s guide, sdk101/d 5. sr-3004, testing guidelines for analog type 1, 2, and 3 cpe as described in sr-ins-002726 (a module of adsi, fr-12), telcordia technologies, january 1995. 6. gr-30-core, lssgr: voiceband data transmission interface section 6.6 (a module of lssgr, fr-64), telcordia technologies, december 1998. 7. gr-31-core, lssgr class sm feature: calling number delivery (fsd 01-02-1051) (a module of lssgr, fr-64), telcordia technologies, june 2000. 8. gr-1188-core, lssgr class sm feature: calling name delivery generic requirements (fsd 01-02-1070) (a module of lssgr, fr-64), telcordia technologies, december 2000. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
xii type 1 telephony features library motorola 9. gr-1401-core, lssgr class sm feature: visual message waiting indicator generic requirements (fsd 01-02-2000) (a module of lssgr, fr-64), telcordia technologies, june 2000. 10. itu-t recommendation v.23, (11/88) - 600/1200-baud modem standardized for use in the general switched telephone network . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola introduction 1-1 chapter 1 introduction welcome to motorola ? s family of digital signal processors, or dsps. this document describes the type 1 telephony features library, which is a part of motorola ? s comprehensive software development kit, sdk, for its dsps. in this document, you will find all the information required to use and maintain the type 1 telephony features library interface and algorithms. motorola provides these algorithms to you under license for use with motorola dsps to expedite your application development and reduce the time it takes to bring your own products to market. motorola ? s type 1 telephony features library is a licensed software library for use on motorola dsp56800e series processors. please refer to the software license agreement in chapter 7 for license terms and conditions. 1.1 quick start motorola ? s embedded sdk is targeted to a large variety of hardware platforms. to take full advantage of a particular hardware platform, use quick start from the targeting motorola dsp5685x platform doc- umentation. for example, the targeting motorola dsp5685x platform manual provides more specific information and examples about this hardware architecture. if you are developing an application for the dsp56858evm board, or any other dsp56858 development system, refer to the targeting motorola dsp5685x platform manual for quick start or other dsp56858-specific information. note: ? dsp568xx ? refers to the specific device for which you ? re developing, as shown in the preceding example. 1.2 telephony features libraries the type 1 telephony features library is one of a set of motorola embedded sdk modules and applica- tions consisting of the following:  type 1 telephony features library  type 1 and 2 telephony features library  type 1 and 2 telephony parser library  full duplex speakerphone library f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
1-2 type 1 telephony features library motorola introduction  generic echo canceller library  feature phone application software these modules are designed to interoperate to provide all of the software necessary to implement a feature phone with full duplex speakerphone and type 1 and 2 caller id functionality. using some or all of these modules, several other types of telephony applications are also possible. each module may also be used independently. 1.3 overview of the type 1 telephony features library customer premises equipment (cpe) using the type 1 telephony features library has the features to sup- port existing on-hook caller id services, such as calling number delivery and calling name delivery; other existing on-hook services, such as visual message waiting indicator (vmwi) or call qualifier (cq); as well as future services that would use the on-hook gr-30-core voice band data transmission interface from the public switched telephone network (pstn). type 1 cpe supports on-hook signaling with or without power ringing and can decode data frames packaged in the gr-30-core single data message format (sdmf) or multiple data message format (mdmf), depending on the needs of the spe- cific telephony service supported, as described in telcordia sr-3004 and other referenced service-specific documents. while this module is primarily intended to be used for caller id reception, other convenient features have been added to allow for simple integration into a caller id telephone. while the module is in an on-hook state, ring generator samples may be created during power ringing. these samples may be output to an audio channel (for example, to be played to a speaker). while the module is in an off-hook state, dtmf samples may be generated for dialing digits. timing for a line flash is also provided. the caller id is received between the first and second ring. the content displayed should include date, time, and the directory telephone number and/or the name of the caller. other existing service-specific con- tent may also be displayed, such as call qualifier displays. the service-specific content of future services may be displayed when these become deployed in the pstn. vmwi may be transmitted with or without power ringing, but must be received without power ringing. the cpe is instructed by the data received in gr-30-core format to turn a light or other visual indicator on or off, indicating that new messages have been received at a voice mail system or other messaging ser- vice. the performance of cpe that incorporates the type 1 telephony features library (also called the type 1 library module) complies with the transmission layer requirements of telcordia sr-3004, including those for:  frequency shift keying (fsk) modulation sensitivity  twist, or level differences between fsk signal tones  fsk frequencies and variation from their nominal values ? in addition to complying with the fsk modulation frequencies of sr-3004, the type 1 telephony features library can also detect fsk transmitted using the slightly different frequencies specified by the itu-t v.23 modem recommendation. however, the type 1 telephony features library cannot be used directly in equipment for international telephone networks with v.23, since the timing protocols are likely different. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
overview of the type 1 telephony features library motorola introduction 1-3  robust detection of incoming fsk signals in the presence of significant noise impairments on the telephone line  all signal and inter-signal timings required in sr-3004, with or without power ringing  the ability to receive fsk after detecting power ringing signals which have any of the various cadences required by sr-3004, in addition to the normal ringing pattern 1.3.1 background the on-hook type 1 library is basically a frequency shift keying (fsk) receiver with the following addi- tional abilities:  to detect power ringing  to recognize and remain immune to various other voltage level shifts identified in sr-3004 that may precede fsk data with or without power ringing  to recognize the start of fsk data reception ? following various other voltage level shifts identified in sr-3004 and power ringing ? following only various other voltage level shifts identified in sr-3004 (power ringing does not precede fsk data) ? if not preceded by any of the various other voltage level shifts identified in sr-3004 thus, required inputs to this library are:  indication of power ringing ? usually present before reception of caller id in fsk data ? usually absent before reception of vmwi in fsk data ? used by the library to disable the fsk receiver during power ringing  indication of open switching intervals (osis) or other voltage level shifts that may precede the fsk data  the fsk data in the gr-30-core format appropriate for calling number delivery, calling name delivery, vmwi, or other existing or future telephony service a line interface is needed to detect the presence of a power ringing signal. the line interface can be a data access arrangement (daa) or any line interface that can pass fsk signals from the telephone network and has a ring detect circuit that can indicate to the dsp that a power ringing signal has been received. the line interface circuitry may vary, depending on the individual case. for the type 1 telephony features library to comply with telcordia sr-3004 requirements, the user must supply a suitable line interface that meets the following requirements:  frequency response--the received signal must be within voice (also called line) bandwidth, which ranges from 300 to 3400hz  attenuation distortion (front end range)--the type 1 telephony features library is designed to interoperate with an analog-to-digital converter (adc) with an analog signal input range of 2.73dbm 3db. in other words, the adc in the line front end should have a 3v peak-to-peak analog input voltage range. in one possible implementation using the motorola dsp56858evm board, the ring signal indication from the line interface must pass to the dsp56858evm on one of the dsp gpiob pins. the signal from the line interface can be passed to the dsp56858evm using a stereo jack. details of required jumper settings are described in the dsp56858 evaluation module user ? s manual . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
1-4 type 1 telephony features library motorola introduction the rest of this section describes the operation at a system level of a generic fsk receiver, the major com- ponent of this library. figure 1-1 provides a high-level example of a generic fsk receiver used in the type 1 telephony features library. the fsk receiver is shown inside the dashed lines in figure 1-1 . the components shown outside the dashed lines are not supplied with the type 1 telephony features library. figure 1-1. the functional blocks of a generic type 1 telephony solution the fsk receiver performs noise filtering, signal detection, demodulation, and framing, then passes caller id (or vmwi, etc.) to the application layer to display on the cpe. the fsk receiver is always enabled, so it can receive vmwi without power ringing. if receiving caller id, power ringing will be signaled to the dsp to disable the fsk receiver during the ringing. the digital samples must be collected with an adc at tip ring daa adc bpf agc demodulator lpf decision maker slicer framing parser functional blocks of a generic fsk receiver screen hour : minute month : day number name f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
overview of the type 1 telephony features library motorola introduction 1-5 the sampling rate of 8khz, with a minimum of 14-bit linear precision (8-bit -law). the adc is not part of this solution and must be supplied separately by the application developer; however, the dsp56858evm board contains an adc. the fsk receiver starts processing the digital samples received as soon as the adc sends them. the fsk receiver accepts an fsk signal transmitting at a baud rate of 1200bps accord- ing to telcordia technologies sr-3004. the digital samples from the adc will first pass through a bandpass filter (bpf) as shown in figure 1-1 , where only the signals within line bandwidth (300 ? 3400hz) can be passed. the bpf output will be pro- cessed in an automatic gain control (agc) function. the agc estimates the signal level to compensate for the amplitude distortions introduced by the telephone network. in addition, the estimated power level is used for signal detection. the agc output sample is then sent to a software demodulator. the demodulator will introduce a double frequency component. the following low pass filter (lpf) is used to remove the double frequency component and pass signals within the sample frequency range. the outputs of the demodulator are sent to the slicer, where timing recovery is performed and a decision for a symbol is made. the symbols are then framed to form an ascii word. the ascii words are passed to upper-layer functionality external to the type 1 telephony features library for parsing and displaying caller id information, or for activating/deactivating the vmwi. the user must supply a parser algorithm external to this type 1 telephony features library to decode the message layer ascii words according to the appropriate service-dependent gr-30-core format - either sdmf or mdmf - in a manner compliant with the message layer requirements of sr-3004. see refer- ences for the format applicable to each service that uses the gr-30-core protocol supported by the type 1 telephony features library. the parser library supplied with the embedded sdk is the preferred method for interoperating with the type 1 telephony features library to achieve both transmission layer and message layer sr-3004 compliance. 1.3.2 features and performance ta b l e 1 -1 details the memory and mips requirements for the type 1 telephony features library. table 1-1. type 1 telephony features library memory and mips requirements program memory (rom) (16 bit words) data rom (16 bit words) data ram 1st instance (16 bit words) data ram additional instance (16 bit words) mips (when all program and data is internal memory) type 1 telephony fea- tures library 1.7 k 20 257 192 9.6 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
1-6 type 1 telephony features library motorola introduction f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola directory structure 2-1 chapter 2 directory structure note: ? dsp568xx ? refers to the specific device for which you ? re developing, as shown in chapter 1, ? introduction. ? 2.1 required core directories figure 2-1 details required platform directories: figure 2-1. core directories as shown in figure 2-1 , dsp56858evm has no operating system support (nos), and includes the follow- ing core directories:  applications contains applications software that can be exercised on this platform  bsp contains board support package specific for this platform  config contains default hardware and software configurations for this platform  include contains sdk header files which define the application programming interface  sys contains required system components  tools contains utilities used by system components there are also optional directories that include domain-specific libraries. dsp568xxevm nos applications bsp config include sys tools + + + + src f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
2-2 type 1 telephony features library motorola directory structure 2.2 optional (domain-specific) directories figure 2-2 shows the domain-specific directory, cidtype1 . figure 2-2. cidtype1 directory as shown in figure 2-3 , the telephony directory includes specific vocoder algorithms, such as g.728, or g.726, as well as cidtype1 - the directory that includes the type 1 telephony features library for receiv- ing on-hook caller id and other services. the cidtype1 directory includes type 1 interface algorithms. figure 2-3. cidtype1 directory structure aec caller_id cas_detect cidparse + + + + cidtype1 + cidtype12 + dsp568xxevm nos applications bsp config include modem security signal sys speech telephony + + + + + + + multimedia + test debug + + cidtype1 test debug configintram f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
optional (domain-specific) directories motorola directory structure 2-3 the cidtype1 directory shown in figure 2-3 includes:  debug contains the library file ( cid1.lib ) for the pre-built type 1 telephony features library  test contains the test project cid1test.mcp for the pre-built type 1 telephony features library ? contains c source for the test application ? configintram contains the linker.cmd file for the test app and also contains appconfig.c and appconfig.h to override the sdk ? s config.h for this particular project f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
2-4 type 1 telephony features library motorola directory structure f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola type 1 telephony features library interfaces 3-1 chapter 3 type 1 telephony features library interfaces the type 1 telephony features library is defined as: type1cid.lib the service, interface, and function calls included are described below. 3.1 type 1 telephony features library interface services the type 1 telephony features library interface provides caller id, visual message waiting indicator (vmwi), and other related services which occur in the on-hook state. the type 1 telephony features library supports fsk signals with a baud rate of 1200bps. the library demodulates the fsk into ascii words and passes the data payload to the application program for processing and presentation. the fsk message can be in single or multiple data message format per telcordia sr-3004. in the on-hook state, the actual fsk message is received between the first and second ring. if an fsk message is not detected during this period, no information will be available until the next call. other services, such as vmwi, may not involve power ringing at all. 3.2 interface the type 1 telephony features library can be called by an application program in c. code example 3-1 contains structure definitions of teldef_scontrol and teldef_ssamples which are used by the type 1 telephony features library to receive information from the application and then to output results to the application. the following is a listing of the variables in teldefs.h that are related to the type 1 telephony features library only. the other variables are described in their respective library documents. code example 3-1. teldefs.h - reference definition for type1cid #ifndef __teldefs_h #define __teldefs_h f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
3-2 type 1 telephony features library motorola type 1 telephony features library interfaces typedef struct teldefs_tscontrol { // phone state. int hookswitch; //on hook or off hook. int handsfreelayer1; //speaker phone on or off. //------------------- caller id.-------------------------- int intpdata; //pointer for modular buffer. int cidringpolarity; //ring signal high or low. int cidbyteready; //flag for a byte when ready. int cidbyte; //contents of the byte. int messagedone; //flag for a message when ready. int messagelength; //length of the message. int frameerrors; //indicates if frame error occurred during fsk. int flashcommand; //indicates line should be flashed. int flashpolarity; //indicates the direction of flashing. int cwdcommand; //begin a call waiting deluxe pulse/dial. int disableringer; //disable ring generator. // dtmf dialer int dtmfrequest; //to dial a dtmf. on = 1, off = 0. int dtmfdigit; //the dtmf digit to be dialed. int dtmfcomplete; //flag for a dtmf when dialing complete. //---------------- generic echo canceller ----------------- //generic echo canceller related variables //are declared here. //--------------- full duplex speakerphone ---------------- //full duplex speakerphone related //variables are declared here. } teldefs_scontrol; typedef struct teldefs_tssamples { int line[5]; //line input or audio output. int audio[5]; //audio input or line output. int gec[5]; //generic echo canceller?s output. int aec[5]; //fdspk?s output. int voipinput[5]; //third port?s input. int voipoutput[5]; //third port?s output. int leccid[5]; //used by type 2 to receive line echo cancelled //samples. } teldefs_ssamples; #endif f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
interface motorola type 1 telephony features library interfaces 3-3 the structure defined in cid1.h , cid_sdata , is allocated by the type1cidcreate() function, but is accessed only by the type 1 caller id functions. it is essential that memory be allocated for this structure for the type 1 caller id functions to use and that no other function, or the application itself, access the memory space reserved for this structure. the type 1 caller id function stores values that it needs to reuse, so tampering with the contents of the structure will cause the function to give erroneous results. as shown in code example 3-2 and code example 6-1 , statically allocate both a teldef_scontrol and teldef_ssample structure for each instance of a caller id channel, while using a call to type1cidcreate() to dynamically allocate the data structure. the use of function prototypes and structure instances for the type 1 telephony features library are described in header file cid1.h , shown in code example 3-2 . code example 3-2. cid1.h - reference definition for type1cid #ifndef __cid1_h #define __cid1_h /*************************** foundational include files ****************************/ #include "cid_type1.h" #ifndef __teldefs_h #include "teldefs.h" #endif /************************************************* structures that must be defined before accessing type 1 caller_id pointer. examples are shown below: *************************************************/ /* teldef_scontrol line1control cid_sdata* pcid1data teldef_ssample line1samples */ /************************************************* function prototypes for type 1 interface library *************************************************/ cid_sdata* type1cidcreate(teldef_tscontrol *pcontrol); void type1ciddestroy(cid_sdata *pdata, teldef_tscontrol *pcontrol); void type1cidinit(cid_sdata *pdata, teldef_tscontrol *pcontrol); void type1cid(cid_sdata *pdata, teldef_tscontrol *pcontrol, teldef_tssample *psample); f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
3-4 type 1 telephony features library motorola type 1 telephony features library interfaces /* local variables for type 1 telephony features, size of 127. structure _sdata details are defined in header file cid_type1.h, which also contains various space allocators and housekeeping variables. however, since these variables are not manipulated by the application, the contents of cid_type1.h are not documented in this sdk. */ #endif 3.2.1 variable definition this section includes a more detailed explanation of the variables in structure teldefs_tscontrol that an application using the type 1 telephony features library must set. also included in teldefs.h are the data structures for the type 1 and 2 telephony parser library, needed to help display the received fsk message. for additional information, see the document type 1 and 2 telephony parser library . hookswitch set by the application to indicate to the type 1 and type 1 and 2 libraries whether the phone is on-hook or off-hook on-hook = 0 off-hook = 1 handsfreelayer1 set by the application to indicate to the type 1 and type 1 and 2 libraries whether the handset or handsfree is enabled intpdata set and allocated by the type1create() to indicate the address of the modulo buffer for fsk cidringpolarity set by the application to indicate to the type 1 and type 1 and 2 libraries when a ringing signal is detected on the ringing detect circuit. the ringing detect circuit should be capable of detecting either the envelope of the ringing signal itself or of a square wave whose fundamental frequency is the ring frequency. for purposes of ringing detection, the envelope of a signal is either the amplitude of a signal or some more slowly varying amplitude detected by less sensitive circuitry. cidbyteready set by the type 1 and type 1 and 2 libraries to indicate to the application (or type 1 and 2 telephony parser library) that one byte is ready from the fsk receiver cidbyte set by the type 1 and type 1 and 2 libraries; it holds the actual byte messagedone set by the type 1 and type 1 and 2 libraries to indicate to the application (or type 1 and 2 telephony parser library) that an fsk message is completed messagelength set by the type 1 and type 1 and 2 libraries to indicate the length of the fsk message to the application frameerrors set by the type 1 and type 1 and 2 telephony features libraries to indicate to the application whether a framing error occurred during reception of the last fsk message. this must be cleared by the application upon reception. flashcommand a message sent from the module to the application indicating that the line is to be flashed according to flash polarity. this must be cleared by the application upon reception. line is to be flashed = 1 do nothing = 0 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
interface motorola type 1 telephony features library interfaces 3-5 flashpolarity set by the module to indicate the polarity of the flash. when flashcommand is set, go on-hook when the flashpolarity equals zero and go off-hook when flashpolarity equals one. note: do not change the hookswitch variable when executing a flash. cwdcommand set by the application to instruct the module to begin a call waiting deluxe pulse/dial. in type 1, there are no call waiting deluxe features supported, so this variable is used only for a standard line flash. do nothing = 0 answer or standard flash = 10 disableringer set by the application to disable the ring generator when on-hook dtmfrequest set by the application when it requires the module to dial a dtmf digit on = 1 off = 0 dtmfdigit the particular digit to be dialed. the possible entries range from integer values of 0 to 11, which correspond to the nine digits, *, and #, in that order. dtmfcomplete flag set by the module for the application ? s information on completion of a single dtmf request f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
3-6 type 1 telephony features library motorola type 1 telephony features library interfaces 3.3 specifications the following sections describe the type 1 telephony features library functions. function arguments for each routine are described as in, out, or inout. an in argument means that the parameter value is an input only to the function. an out argument means that the parameter value is an output only from the functions. an inout argument means that a parameter value is an input to the function, but the same parameter is also an output from the function. typically, inout parameters are input pointer variables in which the caller passes the address of a pre-allocated data structure to a function. the function stores its results within that data structure. the actual value of the inout pointer parameter is not changed. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
specifications motorola type 1 telephony features library interfaces 3-7 3.3.1 type1cidcreate call(s): cid_sdata* type1cidcreate( teldef_tscontrol *pcontrol ); required headers: teldefs.h , cid1.h arguments: table 3-1. type1cidcreate arguments description: the type1cidcreate function allocates the data memory structure and modulo buffer for the type1cid function, then calls the type1cidinit function. this function is to be called once before using the type1cid function. the prototype of this function is defined in cid1.h . returns: the function type1cidcreate returns a pointer to the data structure. special issues: none code example: none pcontrol in points to the structure where input and output control information is stored f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
3-8 type 1 telephony features library motorola type 1 telephony features library interfaces 3.3.2 type1ciddestroy call(s): void type1ciddestroy ( cid_sdata *pdata, teldef_tscontrol *pcontrol ); required headers: teldefs.h , cid1.h arguments: table 3-2. type1ciddestroy arguments description: this function deallocates any memory that was used by the current type1cid instance. the prototype of the type1ciddestroy function is defined in cid1.h . returns: none special issues: none code example: none pdata in points to the structure where fsk static data is stored pcontrol in points to the structure where input and output control information is stored f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
specifications motorola type 1 telephony features library interfaces 3-9 3.3.3 type1cidinit call(s): void type1cidinit( cid_sdata *pdata, teldef_tscontrol *pcontrol ); required headers: teldefs.h , cid1.h arguments: table 3-3. type1cidinit arguments description: the type1cidinit function initializes all of the constants, variables and counters contained in the cid_sdata structure for the type1cid function. this function is to be called once before using the function type1cid . this action is performed by calling type1cidcreate function. the function type1cidcreate should also be called when going on-hook or off-hook after changing the hookswitch variable. the prototype of this function is defined in cid1.h . returns: none special issues: none code example: none pdata inout points to the structure where fsk static data is stored pcontrol inout points to the structure where input and output control information is stored f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
3-10 type 1 telephony features library motorola type 1 telephony features library interfaces 3.3.4 type1cid call(s): void type1cid(cid_sdata *pdata, teldef_tscontrol *pcontrol, teldef_tssample *psample); required headers: teldefs.h, cid1.h arguments: table 3-4. type1cid arguments description: the type1cid function performs on-hook fsk reception. according to the control information from its arguments, it enables the fsk receiver and passes the fsk to the upper layer process to display the data. this function should be called 1600 times per second. hookswitch = 0 (on-hook):  psample.line[] samples are inputs to this function and are decoded into data bytes when caller id is present  psample.line[] samples are outputs from this function and are ringer generator samples when ringing is present; otherwise, these samples are filled with zeros  psample.audio[] samples are ignored and filled with zeros hookswitch = 1 (off-hook):  if handsfreelayer1 is set, psample.gec[] are copied into psample.line[] samples; otherwise, psample.line[] samples are unchanged  if a dtmf digit has been requested by setting dtmfrequest , psample.audio[] is filled with dtmf samples; otherwise, psample.audio[] samples are unchanged returns: none special issues: none code example: none pdata inout points to the structure where fsk static data is stored pcontrol inout points to the structure where input and output control information is stored psample inout points to the structure where the voice samples are stored f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola building the type 1 telephony features library 4-1 chapter 4 building the type 1 telephony features library 4.1 building the type 1 telephony features library the type 1 telephony features library combines all components described in the previous section into one library: cid1.lib . the library is prebuilt for the user, so a project for building the library is not provided. the library is located in the ...\telephony\cidtype1\lib directory of the sdk directory structure. figure 4-1 shows how the cid1.lib is linked to the type 1 test project, cid1test.mcp . the header file, teldefs.h , also must be linked when using the type 1 library, cid1.lib . . figure 4-1. example of a cid1 library link to a project f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
4-2 type 1 telephony features library motorola building the type 1 telephony features library f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola linking applications with the type 1 telephony features library 5-1 chapter 5 linking applications with the type 1 telephony features library 5.1 type 1 telephony features library the type 1 telephony features library consists of an initialization and processing function. the type 1 library can be initialized and created by the type1cidinit and type1cidcreate functions. their functionality and arguments are described in section 3.3.3 and section 3.3.1 . the library contains apis, which provide the interface between the user application and the type 1 library. to use the type 1 library, apis must be called in the following order: ? type1cidcreate(....); //the user must call this function once for every instance. ? type1ciddestroy(....); //the user must call this function to deallocate memory. ? type1cidinit( ? .); //the user must call this function for hook switch change. ? type1cid( ? .); //the user must call this function to display caller id in on-hook state. 5.1.1 library sections an example of the memory section for the type 1 telephony features library is shown in this section. the data memory requirement for the type 1 telephony features library is 127 words. the size of the program space requires 1.2kwords. all program and data memory may reside in internal or external memory. a dynamic memory section of at least 127 words plus 16 words aligned on a 16-word boundary is required. all programs for this library are in the section cid1.text . an example linker.cmd file is shown in code example 5-1 . the program and data memory for the type 1 telephony features library are in the fsk section. this text and data section contains all the code and data necessary to execute the type1cid function. code example 5-1. example of a linker.cmd file for type 1 telephony features library #******************************************************************************* # # linker.cmd file for dsp56858 external ram # using only external program and data memory. # f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
5-2 type 1 telephony features library motorola linking applications with the type 1 telephony features library #******************************************************************************* memory { .pinterruptvector (rwx) : origin = 0x000000, length = 0x00008c .pintram (rwx) : origin = 0x00008c, length = 0x009f74 .pextram (rwx) : origin = 0x00a000, length = 0x1e6000 .pintrom (rx) : origin = 0x1f0000, length = 0x000400 .xintram (rw) : origin = 0x000000, length = 0x005000 .xintram_dynamicmem (rw) : origin = 0x005000, length = 0x001000 .xstack (rw) : origin = 0x006000, length = 0x000800 .xextram_dynamicmem (rw) : origin = 0x006800, length = 0x001000 .xextram (rw) : origin = 0x000000, length = 0x005000 .xperipherals (rw) : origin = 0x1ffc00, length = 0x000400 .xextram2 (rw) : origin = 0x200000, length = 0xdfff00 .xcoreregisters (rw) : origin = 0xffff00, length = 0x000100 } #******************************************************************************* force_active {fconfiginterruptvector} #******************************************************************************* sections { #******************************************************************************* .applicationinterruptvector : { vector.c (.text) } > .pinterruptvector #******************************************************************************* .applicationcode : { # place all code into program ram * (.text) * (rtlib.text) * (fp_engine.text) * (user.text) # place all data into program ram f_pdata_start_addr_in_rom = 0; f_pdata_start_addr_in_ram = .; pramdata.c (.data) f_pdata_romtoram_length = 0; f_pbss_start_addr = .; _p_bss_addr = .; f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
type 1 telephony features library motorola linking applications with the type 1 telephony features library 5-3 pramdata.c (.bss) f_pbss_length = . - _p_bss_addr; } > .pextram #**************************************************************************** .cid1libraycode : { # place cid1 code into program internal ram * (cid1.text) } > .pintram **************************************************************************** .applicationdata : { # define variables for c initialization code f_xdata_start_addr_in_rom = .; f_stackaddr = addr(.xstack); f_stackendaddr = addr(.xstack) + sizeof(.xstack) - 1; f_xdata_start_addr_in_ram = .; # define variables for sdk mem library # data (x) memory layout _ex_bit = 0; # internal memory partitions (for mem.h partitions) _num_im_partitions = 0; # im_addr_1 (no im_addr_2 ) # external memory partition (for mem.h partitions) _num_em_partitions = 1; # em_addr_1 fmemexbit = .; writeh(_ex_bit); fmemnumimpartitions = .; writeh(_num_im_partitions); fmemnumempartitions = .; writeh(_num_em_partitions); fmemimpartitionlist = .; writeh(addr(.xintram_dynamicmem)*1); writeh(sizeof(.xintram_dynamicmem)*1); fmemempartitionlist = .; writeh(addr(.xextram_dynamicmem)*1); writeh(sizeof(.xextram_dynamicmem)*1); f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
5-4 type 1 telephony features library motorola linking applications with the type 1 telephony features library # add rest of the data into external ram * (.const.data) * (.data) * (fp_state.data) * (rtlib.data) f_xdata_romtoram_length = 0; f_xbss_start_addr = .; _x_bss_addr = .; * (rtlib.bss.lo) * (rtlib.bss) * (.bss) f_xbss_length = . - _x_bss_addr; # copy data } > .xextram #**************************************************************************** farchio = 0x0000; farchcore = addr(.xcoreregisters); farchinterrupts = addr(.pinterruptvector); } f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola type 1 telephony features library applications 6-1 chapter 6 type 1 telephony features library applications 6.1 type 1 verification test to verify the functionality of the type 1 telephony features library, an individual test application is provided. the test processes the samples that are precaptured from a nominal fsk transmission. the corresponding caller id will be printed on screen. the test application is located in the ...telephony\cidtype1\test directory. the name of the test project is cid1test.mcp . 6.1.1 test set-up and procedure the test application runs in simulation and does not require external equipment. before executing the test application, the target setting protocol must be selected in the simulator . it can be set in protocol option in m56800 target settings . the test project for type 1 is cid1test.mcp . before loading the executable project, the project must be compiled with no errors. this is done by choosing the make option in the project menu or by pressing [f7]. to load the executable project, choose the debug option in the project menu or press [f5]. to run the test application, use the mouse to choose the green arrow button or manually press [f5] on the keyboard. after the application starts running, the application initializes and automatically processes the precaptured samples. the functionality of the type 1 telephony features library will be verified and a caller id message will be printed on the console window. the application stops after completing the process and prints ? pass ? on the console window. should the application print ? fail ? , the type 1 telephony features library is not operating correctly. this is not expected to happen for this test application; however, if it does, please report the failure and test conditions to motorola for resolution. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
6-2 type 1 telephony features library motorola type 1 telephony features library applications 6.2 example application using cid1.lib an example using the type 1 telephony features library to illustrate how to set the library variables for type1cid in the control structure of teldefs.h is shown in code example 6-1 . this code does not exist in the actual cidtype1 directory in the sdk. code example 6-1. use of type1cid interface #include #include #include "teldefs.h" #include "cid1.h" #include "mem.h" #ifdef useparser #include "cidparser.h" #endif struct teldefs_tssamples line1samples; struct cid_tsdata* pcid1data; struct teldefs_tscontrol line1control; #ifdef useparser teldefs_sparser parsercontrol; #endif int main(void) { // initialize some necessary structure elements and call create function line1control.messagedone=0; line1control.cidbyteready = 0; line1control.extusecheck=0; line1control.noextfound=1; line1control.frameerrors=0; line1control.dtmfrequest=0; line1control.dtmfcomplete=0; line1control.hookswitch = 0; line1control.flashcommand = 0; line1control.cwdcommand = 0; pcid1data = type1cidcreate(&line1control); #ifdef useparser parsercontrol.fskmessageindex=0; parsercontrol.fskparserlength=0; #endif while(1) { /* wait for 5 8khz samples to be received and transmitted by */ f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
example application using cid1.lib motorola type 1 telephony features library applications 6-3 /* the codec interrupt service routine. */ while(!samplesready){ ; /* do nothing */ } calleridappmain(); } type1ciddestroy(pcid1data,&line1control); return 0; } void calleridappmain(){ int i; /* copy samples from codec buffers */ for( i = 0; i < 5 ; i++){ codecbufferleftout[i] = line1samples.audio[i]; codecbufferrightout[i] = line1samples.line[i]; line1samples.line[i] = codecbufferleftin[i]; line1samples.audio[i] = codecbufferrightin[i]; } // get ring signal from daa if( /* poll ring detect bit here */ ){ line1control.cidringpolarity = 1; // ring present } else{ line1control.cidringpolarity = 0; // ring not present } // call type 1 telephony features library type1cid(pcid1data,&line1control,&line1samples); // process command for line flash if(line1control.flashcommand){ line1control.flashcommand = 0; if(line1control.flashpolarity == 1) go_offhook(); else go_onhook(); } #ifdef useparser // use type 1 and 2 telephony parser library cidmessageparser(&parsercontrol, &line1control); f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
6-4 type 1 telephony features library motorola type 1 telephony features library applications if(parsercontrol.fskparserlength != 0){ /* parsed message ready. send to output device */ if(parsercontrol.errortype == 0){ for( i = 0 ; i < parsercontrol.fskparserlength ; i++) printf("%c",parsercontrol.fskparserbuffer[i]); } parsercontrol.fskparserlength=0; } #elseif // use custom parser if(line1control.cidbyteready){ /* buffer cid bytes here*/ cid_message_buffer[cid_message_index++] = line1control.cidbyte; } if (line1control.messagedone){ if(line1control.frameerrors == 0){ /* call custom parser here */ } else line1control.frameerrors = 0; } #endif } code example 6-1 shows a basic application using the cid1.lib module. this module is designed to interact with the type 1 and 2 telephony parser library ( cidparser.lib ); however, independent usage of the cid1.lib module is supported. when implementing a full duplex speakerphone, the cid1.lib module is intended to be used with the fdspk.lib and gec.lib modules; however, custom line echo canceller and full duplex speakerphone software can also interface with the cid1.lib module. this example shows how to manage caller id information using either the type 1 and 2 telephony parser library or a custom parser. the defintion useparser is undefined when a custom parser is desired. when using a custom parser, the application must transfer the input bytes into a buffer, then process them. when using the type 1 and 2 telephony parser library, this is done automatically. while this module is primarily intended to be used for caller id reception, other convenient features are added to allow for simple integration into a caller id telephone. while the module is in an on-hook state ( line1control.hookswitch = 0), the line[] samples buffer will be filled with ring generator samples during power ringing. otherwise, the line[] samples will be filled with zeros. these samples may act as an output to an audio channel (for example, to be played to a speaker). while the module is in an off-hook state ( line1control.hookswitch = 1), the audio[] samples buffer will be filled with dtmf samples when a dtmf digit is requested and will remain unchanged otherwise. the line[] samples remain unchanged during the off-hook state, unless line1control.handsfreelayer1 is set (a condition which is not shown in this example). in this case, the gec[] samples will be copied to the line[] samples structure. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
example application using cid1.lib motorola type 1 telephony features library applications 6-5 the gec[] samples can be obtained by using the gec.lib module, or by using a separate custom echo canceller. the audio[] samples will be modified by the fdspk.lib module (or custom full duplex speakerphone software) in this case. see the description of these modules and featurephone application for more detailed information. in this example, there are two gpio pins; one output pin, which places the telephone interface on-hook or off-hook, and one input pin, which indicates the ring detect from the the telephone interface. the ring detect pin is polled in the application and its polarity is placed in the variable line1control.cidringpolarity . this information is necessary for the type 1 telephony features library, even when disableringer is set (disabling the ring tone generator) and should be polled at a rate of 1600/sec as shown in the application. however, slower polling rates may be tolerated. it is assumed that the functions go_onhook() and go_offhook() , which are not shown in code example 6-1 , would simply set or clear the output pin connected to the telephone interface. however, note that these are not the same as when the application actually puts the module into an on-hook or off-hook state. in this situation, the application must also set or clear the line1control.hookswitch variable and then call type1cidinit() . the codec interrupt service routine is also not shown in this example. this routine is assumed to transmit and receive 8khz samples from a codec and read/write to the buffers codecbufferleftin[] and codecbufferleftout[] . this codec is connected to the telephone line interface. this routine is also assumed to transmit and receive 8khz samples from a codec and read/write to the buffers codecbufferrightin[] and codecbufferrightout[] . this codec is connected to an audio interface. when the isr has received/transmitted five samples, the buffers are full/empty and the samplesready flag is set, indicating to the application that it should call calleridappmain() . the calling rate of this routine should be 1600 calls/second. in the beginning of the calleridappmain() routine, the codec samples are copied into the module ? s sample structure. note that for the output samples, the line[] samples are copied into the right (audio) codec channel, and the audio[] samples are copied into the left (line) codec channel. this sample "criss-cross" is indicative of the natural signal flow for a telephone. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
6-6 type 1 telephony features library motorola type 1 telephony features library applications f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola license 7-1 chapter 7 license 7.1 limited use license agreement this software is available under a separate license agreement from motorola incorporated. licensing information can be obtained from your motorola sales representative or authorized distributor. for additional product information, see http://www.motorola.com/semiconductors/ . f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
7-2 type 1 telephony features library motorola license f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola index i a adc x , 1-3 , 1-4 agc xi american standard code for information interchange ascii xi , 3-1 analog-to-digital converter adc x , 1-3 , 1-4 api xi , 5-1 appconfig.c 2-3 appconfig.h 2-3 application programming interface api xi , 5-1 ascii xi , 3-1 attenuation distortion 1-3 automatic gain control agc xi b bandpass filter bpf xi bpf xi c call qualifier cq xi , 1-2 call waiting deluxe 3-5 caller id 1-2 , 3-1 cid xi calling name delivery 1-2 calling number delivery 1-2 cid xi cid1.h 3-3 cid1.lib 2-3 , 4-1 , 6-2 cid1test.mcp 2-3 , 4-1 , 6-1 cpe xi , 1-2 cq xi , 1-2 customer premises equipment cpe xi , 1-2 d daa xi , 1-3 data access arrangement daa xi , 1-3 digital signal processor dsp xi , 1-1 dsp xi , 1-1 dsp56800e reference manual xi dsp56858evm 2-1 dsp56858evm board 1-3 dsp5685x user ? s manual xi dtmf xi dual tone multiple frequency dtmf xi e embedded sdk programmer ? s guide xi f frequency response 1-3 frequency shift keying fsk xi , 1-2 , 3-1 fsk xi , 1-2 , 3-1 g g.726 2-2 g.728 2-2 gr-1188-core, lssgr class feature calling name delivery generic requirements xi gr-1401-core, lssgr class feature visual message waiting indicator generic requirements xii gr-30-core 1-2 gr-30-core, lssgr voiceband data transmission interface xi gr-31-core, lssgr class feature calling number delivery xi i ide xi integrated development environment ide xi itu-t recommendation v.23 xii , 1-2 l linker.cmd 2-3 , 5-1 low pass filter lpf xi lpf xi m mdmf xi , 1-2 memory and mips requirements 1-5 million instructions per second mips xi index f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
ii type 1 telephony features library motorola mips xi multiple data message format mdmf xi , 1-2 o once xi on-chip emulation once xi open switching interval osi xi , 1-3 osi xi , 1-3 p pc xi pcm xi personal computer pc xi pstn xi , 1-2 public switched telephone network pstn xi , 1-2 pulse code modulation pcm xi s sdk xi , 1-1 sdmf xi , 1-2 single data message format sdmf xi , 1-2 software development kit sdk xi , 1-1 source src xi sr-3004, testing guidelines for analog type 1, 2, and 3 cpe xi src xi t targeting motorola dsp5685x user ? s manual xi telcordia sr-3004 1-2 , 3-1 teldefs.h 3-1 , 4-1 , 6-2 twist 1-2 type 1 telephony features library 1-1 type 1 test project 4-1 type1cid 5-1 , 6-2 type1cid.lib 3-1 type1cidcreate 5-1 type1ciddestroy 5-1 type1cidinit 5-1 v visual message waiting indicator vmwi xi , 1-2 , 3-1 vmwi xi , 1-2 , 3-1 voice band data transmission interface 1-2 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005
motorola and the stylized m logo are registered in the us patent & trademark office. all other product or service names are the property of their respective owners. ? motorola, inc. 2002. how to reach us: usa/europe/locations not listed: motorola literature distribution; p.o. box 5405, denver, colorado 80217. 1 ? 303 ? 675 ? 2140 or 1 ? 800 ? 441 ? 2447 japan: motorola japan ltd.; sps, technical information center, 3 ? 20 ? 1, minami ? azabu. minato ? ku, tokyo 106 ? 8573 japan. 81 ? 3 ? 3440 ? 3569 asia/pacific: motorola semiconductors h.k. ltd.; silicon harbour centre, 2 dai king street, tai po industrial estate, tai po, n.t., hong kon g. 852 ? 26668334 technical information center: 1?800?521?6274 home page: http://www.motorola.com/semiconductors/ motorola reserves the right to make changes without further notice to any products herein. motorola makes no warranty, represen tation or guarantee regarding the suitability of its products for any particular purpose, nor does motorola assume any liability arising out of the application o r use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. ? typical ? parameters which may be provided in motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. all oper ating parameters, including ? typicals ? must be validated for each customer application by customer ? s technical experts. motorola does not convey any license under its patent rights nor the rights of others. motorola products are not designed, intended, or authorized for use as components in systems intended for sur gical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the motorola product cou ld create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer s hall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expens es, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized u se, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. motorola and the stylized m logo are registered trademarks of motorola, inc. motorola, inc. is an equal opportunity/affirmative action employer. SDK135/d f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . . archived by freescale semiconductor, inc. 2005 archived by freescale semiconductor, inc. 2005


▲Up To Search▲   

 
Price & Availability of SDK135

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X